/*------------------------------------
	
	Play No More
	
	. website | backend | login | js | login.js
	
	..
	2012 © Kazuu
	www.kazuu.com.ar

------------------------------------*/

login = function ()
{
	var j_form 		= $("#login-form");
	var j_nickname	= $("#login-form-nickname");
	var j_password 	= $("#login-form-password");
	
	if(!j_nickname.val()){
		alert("Debes ingresar tu nickname");
		j_nickname.focus();
		return
	}
	
	if(!j_password.val()){
		alert("Debes ingresar tu contraseña");
		j_password.focus();
		return
	}
	
	j_form.submit()
}

$(document).ready(function ()
{
	var j_nickname	= $("#login-form-nickname");
	var j_password = $("#login-form-password");
	
	j_password.keypress(function($e) {
		if ($e.keyCode == 13) login();
	})
	j_nickname.focus();
})